$(function(){
    
    $("#dialog").dialog({ 
        autoOpen: false,
        modal: true,
        height: 300,
        title: "Selecione o Arquivo."
        
    });
    
    $(".clk_sel_rep" ).click(function(){
        $.post(URLBASE+'/'+CONTROL+'/arquivo', function(data) {
            $("#dialog-modal").html(data);
        });
    });
    
    $('#inp-search').bind('keypress', function(e){
        var code = (e.keyCode ? e.keyCode : e.which);
        if(code == '13') { $('#form-search').submit(); }
    });
    if($('#inp-search').val().length  > 1) $('#inp-search').focus();
    
    
});
function setValor(val,nom){
    $('.ajx_vlr_id').val(val);
    $('.ajx_vlr_nom').val(nom);
    $("#dialog").dialog( "close" );
}